<template>
    <div>
        <el-image style="width: 100%; height: 100%" :src="imgSrc" :fit="fit" />
    </div>
</template>
<script setup lang="ts">
import { ref } from "vue";
interface Props {
    src?: string;
    fit?: string;
    imgType?: string;
}
// fit ['fill', 'contain', 'cover', 'none', 'scale-down']
const props = withDefaults(defineProps<Props>(), {
    fit: "cover",
    src: "",
    imgType: "1",
});
const imgSrc = ref("");

setTimeout(() => {
    if (props.imgType == "1") {
        imgSrc.value = `${process.env.VUE_APP_BASE_FILE}/sxnf-cloud/${props.src}`;
    } else {
        imgSrc.value = props.src;
    }
}, 300);

console.log(props.imgType);
</script>
